/**
 * 日志分类模型
 */

var mongoose = require('../config/db');

var logSchema = new mongoose.Schema({
    //日志创建时间
    createTime: {
        type: Date,
        default: Date.now
    },
    //日志是哪个用户产生的
    user: {
        type: "ObjectId",
        ref: "user"
    },
    //日志操作
    actType:{
        type: String
    },
    //日志描述
    actDescription:{
        type: String
    },
    //产生日志的用户的ip
    userIp: {
        type: String
    }
});

var logModel = mongoose.model('log',logSchema);
module.exports = logModel;
